package com.lz.common.utils.weather;

public enum WeatherNumEnum {
    SUNNY(113, "Sunny", "晴"),
    PARTLY_CLOUDY(116, "PartlyCloudy", "多云"),
    CLOUDY(119, "Cloudy", "阴"),
    VERY_CLOUDY(122, "VeryCloudy", "阴"),
    FOG(143, "Fog", "雾"),
    LIGHT_SHOWERS(176, "LightShowers", "小雨"),
    LIGHT_SLEET_SHOWERS(179, "LightSleetShowers", "小雨"),
    LIGHT_SLEET(182, "LightSleet", "小雨"),
    LIGHT_SLEET_SHOWERS_2(185, "LightSleetShowers", "小雨"),
    THUNDERY_SHOWERS(200, "ThunderyShowers", "雷阵雨"),
    LIGHT_SNOW(227, "LightSnow", "小雪"),
    HEAVY_SNOW(230, "HeavySnow", "大雪"),
    FOG_2(248, "Fog", "雾"),
    FOG_3(260, "Fog", "雾"),
    LIGHT_SHOWERS_2(263, "LightShowers", "小雨"),
    LIGHT_RAIN(266, "LightRain", "小雨"),
    LIGHT_SLEET_2(281, "LightSleet", "小雨"),
    LIGHT_SLEET_3(284, "LightSleet", "小雨"),
    LIGHT_RAIN_2(293, "LightRain", "小雨"),
    LIGHT_RAIN_3(296, "LightRain", "小雨"),
    HEAVY_SHOWERS(299, "HeavyShowers", "大雨"),
    HEAVY_RAIN(302, "HeavyRain", "大雨"),
    HEAVY_SHOWERS_2(305, "HeavyShowers", "大雨"),
    HEAVY_RAIN_2(308, "HeavyRain", "大雨"),
    LIGHT_SLEET_4(311, "LightSleet", "小雨"),
    LIGHT_SLEET_5(314, "LightSleet", "小雨"),
    LIGHT_SLEET_6(317, "LightSleet", "小雨"),
    LIGHT_SNOW_2(320, "LightSnow", "小雪"),
    LIGHT_SNOW_SHOWERS(323, "LightSnowShowers", "小雪"),
    LIGHT_SNOW_SHOWERS_2(326, "LightSnowShowers", "小雪"),
    HEAVY_SNOW_3(329, "HeavySnow", "大雪"),
    HEAVY_SNOW_4(332, "HeavySnow", "大雪"),
    HEAVY_SNOW_SHOWERS(335, "HeavySnowShowers", "大雪"),
    HEAVY_SNOW_5(338, "HeavySnow", "大雪"),
    LIGHT_SLEET_7(350, "LightSleet", "小雨"),
    LIGHT_SHOWERS_3(353, "LightShowers", "小雨"),
    HEAVY_SHOWERS_3(356, "HeavyShowers", "大雨"),
    HEAVY_RAIN_3(359, "HeavyRain", "大雨"),
    LIGHT_SLEET_SHOWERS_3(362, "LightSleetShowers", "小雨"),
    LIGHT_SLEET_SHOWERS_4(365, "LightSleetShowers", "小雨"),
    LIGHT_SNOW_SHOWERS_3(368, "LightSnowShowers", "小雪"),
    HEAVY_SNOW_SHOWERS_2(371, "HeavySnowShowers", "大雪"),
    LIGHT_SLEET_SHOWERS_5(374, "LightSleetShowers", "小雨"),
    LIGHT_SLEET_8(377, "LightSleet", "小雨"),
    THUNDERY_SHOWERS_2(386, "ThunderyShowers", "雷阵雨"),
    THUNDERY_HEAVY_RAIN(389, "ThunderyHeavyRain", "雷阵雨"),
    THUNDERY_SNOW_SHOWERS(392, "ThunderySnowShowers", "雷阵雨"),
    HEAVY_SNOW_SHOWERS_3(395, "HeavySnowShowers", "大雪"),
    ;
    public Integer code;
    public String value;
    public String chinese;

    WeatherNumEnum(Integer code, String value, String chinese) {
        this.code = code;
        this.value = value;
        this.chinese = chinese;
    }

    //通过code获取chinese
    public static String getChineseByCode(Integer code) {
        for (WeatherNumEnum value : WeatherNumEnum.values()) {
            if (value.code.equals(code)) {
                return value.chinese;
            }
        }
        return null;
    }

}
